package thinkingJava.chapter13;

public class IntegerMatch {
	public static void main(String[] args) {
		System.out.println("-124".matches("-?\\d+"));
		System.out.println("124".matches("-?\\d+"));
		System.out.println("+124".matches("-?\\d+"));
		System.out.println("+124".matches("(-|\\+)?\\d+"));
	}
}
